package com.yunding.house.utils;

import java.io.Serializable;

/**
 * 自定义响应结构
 */
public class R implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;


    private boolean flag;//是否成功
    private String code;// 返回码
    private String message;//返回信息
    private Object data;// 返回数据

    public R() {
    }

    public R(boolean flag, String code, String message) {
        this.flag = flag;
        this.code = code;
        this.message = message;
    }

    public R(boolean flag, String code, String message, Object data) {
        this.flag = flag;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public boolean isFlag() {
        return flag;
    }

    public void setFlag(boolean flag) {
        this.flag = flag;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

}
